package com.situ.mall.web.controller;


import com.situ.mall.common.entity.Order;
import com.situ.mall.common.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-01-29
 */
@RestController
@RequestMapping("/order")
public class OrdersController {

    @Autowired
    private IOrderService orderService;

    //订单页查询用户订单
    @GetMapping("/userOrders")
    public List<Order> userOrders(Integer id) {
        return orderService.userOrders(id);
    }

}
